package com.lc.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Order {
    private Integer uuid;
    private String ordernum;
    private Integer creater;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createtime;
    private Integer checker;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date checktime;
    private Integer completer;
    private String endtime;
    private Integer ordertype;   // 1采购订单 2采购退货订单 3销售订单 4销售退货订单
    private Integer type;  // 1:待审批 2：待运输 3：待入库 4：完成

    private String typeStr;

    public String getTypeStr() {
        switch (this.type) {
            case 1:
                return "待审批";
            case 2:
                return "待运输";
            case 3:
                return "待入库";
            case 4:
                return "完成";
        }
        return "";
    }

    private Integer totalnum;
    private Double totalprice;
    private Integer supplieruuid;
    private Integer storeuuid;
    private String creatername;
    private String checkername;
    private String completername;
    private String suppliername;
    private String storename;
}
